package com.yisu.auction.api.domain.vo.memberPackageVos;

import org.apache.commons.lang.StringUtils;

import java.math.BigDecimal;

/**
 * author: 黄萧林
 * Business Description：
 * createTime：2017/8/16
 */
public class MemberBaseInfoVo {
    private Long id;
    private String nickName;
    private String ico;
    private BigDecimal wallet;
    private BigDecimal presentWallet;
    private String address;
    private String token;
    private String mobile;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNickName() {
        if (StringUtils.isEmpty(nickName)) {
            return "匿名";
        }
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getIco() {
        return ico;
    }

    public void setIco(String ico) {
        this.ico = ico;
    }

    public BigDecimal getWallet() {
        return wallet;
    }

    public void setWallet(BigDecimal wallet) {
        this.wallet = wallet;
    }

    public BigDecimal getPresentWallet() {
        return presentWallet;
    }

    public void setPresentWallet(BigDecimal presentWallet) {
        presentWallet=presentWallet.divide(new BigDecimal(1),2,BigDecimal.ROUND_DOWN);
        this.presentWallet = presentWallet;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Override
    public String toString() {
        return "MemberBaseInfoVo{" +
                "id=" + id +
                ", nickName='" + nickName + '\'' +
                ", ico='" + ico + '\'' +
                ", wallet=" + wallet +
                ", presentWallet=" + presentWallet +
                ", address='" + address + '\'' +
                ", token='" + token + '\'' +
                ", mobile='" + mobile + '\'' +
                '}';
    }
}
